package cn.dnui_zzh807.dnuifood_16110100807.fragment;


import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.widget.RecyclerView;

import java.util.List;

import cn.dnui_zzh807.dnuifood_16110100807.bean.ShopBean;


public class BaseFragment extends Fragment {
    private SharedPreferences sp;
    protected FragmentManager childManager;
    private FragmentTransaction transaction;
    protected Context context;
    private RecyclerView recyclerView;
    private List<ShopBean> mDataList;
    private ShopBean shop;
    public BaseFragment(){
        context = getActivity();
    }
    public String getUser_id(){
        sp = getActivity().getSharedPreferences("userInfo",Context.MODE_PRIVATE);
        return sp.getString("user_id","");
    }
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        childManager = getChildFragmentManager();


    }
    protected void addFragment( Fragment fragment){
        transaction = childManager.beginTransaction();

    }



}
